package com.company.project.core.exception;

/**
 * =================================
 * <p>
 * Created by cjj on 18-4-13.
 * <p>
 * 描述: 自定义业务异常对象
 */

public class BusinessException extends RuntimeException {

    //提示异常码
    private int code;
    //提示信息
    private String msg;

    public BusinessException(ExceptionEnum exceptionEnum) {
        this.code = exceptionEnum.getCode();
        this.msg = exceptionEnum.getMsg();
    }

    public BusinessException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
